home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Text / OzTeX 1.9 / TeX-inputs / Graphics / keyval.sty < prev    next >
Encoding:
Text File  |  1995-01-24  |  1.7 KB  |  64 lines  |  [TEXT/MPS ]

  1. %% 
  2. %% This is file `keyval.sty', generated on <1995/1/24> 
  3. %% with the docstrip utility (2.2i).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% keyval.dtx  (with options: `package')
  8. %% 
  9. %% IMPORTANT NOTICE:
  10. %% You are not allowed to distribute this file.
  11. %% For distribution of the original source see
  12. %% the copyright notice in the file keyval.dtx .
  13. %% 
  14. %% File: keyval.dtx Copyright (C) 1993-1994 David Carlisle
  15. \NeedsTeXFormat{LaTeX2e}
  16. \ProvidesPackage{keyval}
  17.                  [1994/09/12 v1.08 key=value parser (DPC)]
  18. \def\setkeys#1#2{%
  19.   \def\KV@prefix{KV@#1@}%
  20.   \KV@do#2,\relax,}
  21. \def\KV@do#1,{%
  22.  \ifx\relax#1\empty\else
  23.   \KV@split#1==\relax
  24.   \expandafter\KV@do\fi}
  25. \def\KV@split#1=#2=#3\relax{%
  26.   \KV@@sp@def\@tempa{#1}%
  27.   \ifx\@tempa\@empty\else
  28.     \expandafter\let\expandafter\@tempc
  29.       \csname\KV@prefix\@tempa\endcsname
  30.     \ifx\@tempc\relax
  31.       \KV@err{\@tempa\space undefined}%
  32.     \else
  33.       \ifx\@empty#3\@empty
  34.         \KV@default
  35.       \else
  36.         \KV@@sp@def\@tempb{#2}%
  37.         \expandafter\@tempc\expandafter{\@tempb}\relax
  38.       \fi
  39.     \fi
  40.   \fi}
  41. \def\KV@default{%
  42.   \expandafter\let\expandafter\@tempb
  43.     \csname\KV@prefix\@tempa @default\endcsname
  44.   \ifx\@tempb\relax
  45.     \KV@err{No value specified for \@tempa}%
  46.   \else
  47.     \@tempb\relax
  48.   \fi}
  49. \def\KV@err#1{\errmessage{key-val: #1}}
  50. \def\@tempa#1{%
  51. \def\KV@@sp@def##1##2{\KV@@sp@b##2\@nil\@nil#1\@nil\relax##1}}
  52. \@tempa{ }
  53. \def\KV@@sp@b#1#2 \@nil{\KV@@sp@c#1#2}
  54. \def\KV@@sp@c#1\@nil#2\relax#3{\def#3{#1}}
  55. \def\define@key#1#2{%
  56.   \@ifnextchar[{\KV@def{#1}{#2}}{\@namedef{KV@#1@#2}####1}}
  57. \def\KV@def#1#2[#3]{%
  58.   \@namedef{KV@#1@#2@default\expandafter}\expandafter
  59.     {\csname KV@#1@#2\endcsname{#3}}%
  60.   \@namedef{KV@#1@#2}##1}
  61. \endinput
  62. %% 
  63. %% End of file `keyval.sty'.
  64.